A Linear-Time Algorithm for the Terminal Path Cover Problem in Block Graphs
نویسنده
چکیده
In this paper, we study a variant of the path cover problem, namely, the terminal path cover problem. Given a graph G and a subset T of vertices of G, a terminal path cover of G with respect to T is a set of pairwise vertex-disjoint paths PC that covers the vertices of G such that the vertices of T are all endpoints of the paths in PC. The terminal path cover problem is to find a terminal path cover of G of minimum cardinality; note that, if T is empty, the stated problem coincides with the classical path cover problem. We show that the terminal path cover problem can be solved in linear time on the class of block graphs. More precisely, we first establish a tree structural representation for the class of block graphs. Then, based on the tree structure, we present an algorithm which, for a block graph G on n vertices and m edges, computes a minimum terminal path cover of G in linear time, that is, in O(n+m) time. The proposed algorithm is simple and only requires linear space.
منابع مشابه
A Linear-Time Algorithm for the Terminal Path Cover Problem in Cographs
Let G = (V,E) be a graph with vertex set V and edge set E and let T be a subset of V . A terminal path cover PC of G with respect to T is a set of pairwise vertex-disjoint paths of G, such that all vertices of G are visited by exactly one path of PC and all vertices in T are end vertices of paths in PC. The terminal path cover problem is to find a terminal path cover of G of minimum cardinality...
متن کاملTwo optimal algorithms for finding bi-directional shortest path design problem in a block layout
In this paper, Shortest Path Design Problem (SPDP) in which the path is incident to all cells is considered. The bi-directional path is one of the known types of configuration of networks for Automated Guided Vehi-cles (AGV).To solve this problem, two algorithms are developed. For each algorithm an Integer Linear Pro-gramming (ILP) is determined. The objective functions of both algorithms are t...
متن کاملIsometric-path numbers of block graphs
An isometric path between two vertices in a graph G is a shortest path joining them. The isometric-path number of G, denoted by ip(G), is the minimum number of isometric paths required to cover all vertices of G. In this paper, we determine exact values of isometric-path numbers of block graphs. We also give a linear-time algorithm for finding the corresponding paths.
متن کاملOptimizing Cost Function in Imperialist Competitive Algorithm for Path Coverage Problem in Software Testing
Search-based optimization methods have been used for software engineering activities such as software testing. In the field of software testing, search-based test data generation refers to application of meta-heuristic optimization methods to generate test data that cover the code space of a program. Automatic test data generation that can cover all the paths of software is known as a major cha...
متن کاملThe 1-fixed-endpoint Path Cover Problem is Polynomial on Interval Graph
We consider a variant of the path cover problem, namely, the k-fixed-endpoint path cover problem, or kPC for short, on interval graphs. Given a graph G and a subset T of k vertices of V (G), a k-fixed-endpoint path cover of G with respect to T is a set of vertex-disjoint paths P that covers the vertices of G such that the k vertices of T are all endpoints of the paths in P . The kPC problem is ...
متن کامل